Skip to content

fix: correct sourcemap with treeshake - #1069

Merged
sxzz merged 6 commits into
egoist:devfrom
xia0hj:dev
Jul 17, 2024
Merged

sxzz merged 6 commits into
egoist:devfrom
xia0hj:dev

Conversation

@xia0hj

@xia0hj xia0hj commented Dec 28, 2023 •

Copy link
Copy Markdown
Contributor

depends on pr #890

related to issue #889 (comment)

  1. fix incorrect use of applySourceMap()
    correct example: https://github.com/mozilla/source-map/blob/master/test/test-source-map-generator.js#L356-L362

  2. set rollup treeshake output path to ./dist, so that sources in sourcemap can refer to ../src/index.ts instead of src/index.ts

closes #890, closes #889

@codesandbox

codesandbox Bot commented Dec 28, 2023

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web Editor • VS Code • Insiders

Open Preview

@vercel

vercel Bot commented Dec 28, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 2:26pm

@sxzz

sxzz commented Jul 16, 2024

Copy link
Copy Markdown
Collaborator

The unit test failed after rebasing. Could you please fix it?

@xia0hj

xia0hj commented Jul 17, 2024

Copy link
Copy Markdown
Contributor Author

@sxzz done!

@sxzz
sxzz merged commit 6ca0cb0 into egoist:dev Jul 17, 2024
@sxzz sxzz changed the title fix: fix incorrect sourcemap with --treeshake fix: correct sourcemap with treeshake Jul 17, 2024
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This issue has been resolved in version 8.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
Preview — e1548dc4 Deployed Jul 17, 2024 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sourcemaps break when using treeshake: 'smallest'

2 participants